home *** CD-ROM | disk | FTP | other *** search
- #* MAKEFILE
- #************************************************************************
- #* *
- #* PC Scheme/Geneva 4.02 Make file *
- #* *
- #* (c) 1985-1988 by Texas Instruments, Inc. See COPYRIGHT.TXT *
- #* (c) 1992 by L. Bartholdi & M. Vuilleumier, University of Geneva *
- #* *
- #*----------------------------------------------------------------------*
- #* *
- #* The Generic UNIX-ish Makefile *
- #* *
- #*----------------------------------------------------------------------*
- #* *
- #* Created by: L. Bartholdi Date: 1992 *
- #* Revision history: *
- #* - 18 Jun 92: Renaissance (Borland Compilers, ...) *
- #* *
- #* ``In nomine omnipotentii dei'' *
- #************************************************************************
-
- BORLAND = "3.10"
- VERSION = "4.02PL1"
- VMDEBUG = 1
- TDEBUG = 1
-
- .PATH.bor = c:\borlandc
-
- #
- # directories
- #
-
- .PATH.app = bin
- .PATH.ash = sources\asm
- .PATH.asm = sources\asm
- .PATH.bin = bin
- .PATH.c = sources\c
- .PATH.exe = bin
- .PATH.fsl = bin
- .PATH.pcs = bin
- .PATH.h = sources\c
- .PATH.obj = compile
- .PATH.s = sources\s
- .PATH.so = compile
- .PATH.xrf = compile
-
- TOOLS=$(.PATH.bor)\bin
- LIB=$(.PATH.bor)\lib
- CINC=$(.PATH.bor)\include
-
- !if $d(TDEBUG)
- CFLAGS=$(CFLAGS) -v
- ASMFLAGS=$(ASMFLAGS) /zi
- !endif
-
- FLOAT=-f
- MODEL=-mm
- CFLAGS=$(CFLAGS) -M $(MODEL) -C -O2 -k- -Z $(FLOAT)
- ASMFLAGS=$(ASMFLAGS) /z /mx /t /m /i$(.PATH.asm)
-
- ASM=$(TOOLS)\tasm $(AF)
- CC=$(TOOLS)\bcc $(CF)
- GREP=$(TOOLS)\grep
- H2ASH=$(TOOLS)\h2ash
- SCHEME=$(.PATH.exe)\pcs
- TCREF=$(TOOLS)\tcref
- TOUCH=$(TOOLS)\touch
-
- # check include files automatically
- .autodepend
- .suffixes: .asm .c .so
-
- #
- # generic make (must be first) - File order is significant !
- #
-
- it: turboc.cfg tasm.cfg setup autocomp \
- scheme.ash pcs.exe patch.pcs \
- tools web clcp.fsl edwin
- @-del MAKEAUTO.TMP
-
- sources.exe:
- arj a /ya /jm /je /r /b2 /z&&!
- PC Scheme/Geneva, version $(VERSION)
- (c) 1982-1988 Texas Instruments, inc. All rights reserved
- (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
- All source files for Borland C development tools
-
- ---> Use parameter /ya to assume 'yes' to all queries
-
- ! sources makefile.* sources\*.*
- arj a /ya /jm sources.exe /x*.eps /x*.ps /x*.dvi /x*.asc samples\*.* brief\*.* doc\*.*
- arj a /ya /jm sources.exe sources\hershey\hershey.ps sources\hershey\hershey.sw
-
- scheme.arj:
- arj a /ya /jm /r /b2 /xmake0000.$$$ /v1440 /xcompile\\*.* /xbin\*.* /x*.ps /x*.eps /x*.dvi /x*.exe /x*.asc /z&&!
- PC Scheme/Geneva, version $(VERSION)
- (c) 1982-1988 Texas Instruments, inc. All rights reserved
- (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
- Assembly, C and Scheme source files for Borland C development tools
-
- ! scheme
-
- backup.arj:
- arj a /ya /jm /r /b1 /xmake0001.$$$ /v1440 /xcompile\\*.* /xbin\*.* /x*.ps /x*.eps /x*.dvi /z&&!
- PC Scheme/Geneva, version $(VERSION) incremental backup
-
- ! backup
-
- pcscheme.exe: turboc.cfg tasm.cfg pcs.exe setup
- tdstrip bin\pcs.exe
- pklite bin\pcs.exe
- -del pcscheme.exe
- -del bin\*.map
- -del bin\*.tfa
- arj a /ya /jm /je /xmake0000.$$$ /z&&!
- PC Scheme/Geneva, version $(VERSION)
- (c) 1982-1988 Texas Instruments, inc. All rights reserved
- (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
- Executable files and docs for distribution
-
- ---> Use parameter /ya to assume 'yes' to all queries
-
- ! pcscheme bin\*.*
- arj a /ya /jm pcscheme.exe scheme.ini doc\*.doc doc\*.tex doc\*.ps doc\*.asc
- arj a /ya /jm pcscheme.exe samples\*.* brief\*.* edlisp\*.*
- arj a /ya /jm pcscheme.exe sources\hershey\hershey.ps sources\hershey\hershey.sw
-
- pcslim.exe: turboc.cfg tasm.cfg pcs.exe setup
- tdstrip bin\pcs.exe
- pklite bin\pcs.exe
- -del pcslim.exe
- -del bin\*.map
- -del bin\*.tfa
- arj a /ya /jm /je /xmake0000.$$$ /z&&!
- PC Scheme/Geneva, version $(VERSION)
- (c) 1982-1988 Texas Instruments, inc. All rights reserved
- (c) 1992 L. Bartholdi & M. Vuilleumier, University of Geneva
- Only Executable files for distribution, SLIMMED DOWN VERSION
-
- ! pcslim bin\*.*
- arj a /ya /jm pcslim.exe scheme.ini brief\scheme.cm
-
- turboc.cfg: makefile
- echo -DVERSION=$(VERSION) >turboc.cfg
- !if $d(VMDEBUG)
- echo -DVMDEBUG >>turboc.cfg
- !endif
- echo -I$(.PATH.c) >>turboc.cfg
- echo -I$(CINC) >>turboc.cfg
- echo -L$(LIB) >>turboc.cfg
- echo -n$(.PATH.obj) >>turboc.cfg
- echo $(CFLAGS) >>turboc.cfg
-
- tasm.cfg: makefile
- echo $(ASMFLAGS) >tasm.cfg
- !if $d(VMDEBUG)
- echo /dVMDEBUG >>tasm.cfg
- !endif
-
- setup:
- -if not exist compile\*.* md compile
-
- #
- # generic rules
- #
-
- .asm.obj:
- $(ASM) $<,$@
-
- .asm.xrf:
- $(ASM) $<,nul,nul,$(.PATH.xrf)\$&
-
- .c.obj:
- $(CC) -P -c {$< }
-
-
- .c.xrf:
- $(CC) -P -S {$< }
- $(ASM) $(.PATH.obj)\$&,nul,nul,$(.PATH.xrf)\$&
- @del $(.PATH.obj)\$&.ASM
-
- .s.so:
- $(SCHEME) MAKEAUTO.TMP {$& }
-
- .so.fsl:
- @copy /b $< $@
-
- .so.pcs:
- @copy /b $< $@
-
- .obj.bin:
- $(TOOLS)\tlink /t $<,$@
-
- #
- # Automatic .h -> .ash translation
- #
-
- # big bugs in h2ash !
- #scheme.ash: scheme.h
- # $(H2ASH) -n$(.PATH.ash) -P -qi $(MODEL) $**
-
- scheme.ash: scheme.h $(.PATH.ash)\scheme.as0
- $(H2ASH) -P -qi $(MODEL) $(.PATH.h)\scheme.h
- @$(GREP) "GLOBAL C.*FAR" $(.PATH.obj)\scheme.ash >$(.PATH.obj)\scheme.as1
- @copy $(.PATH.ash)\scheme.as0+$(.PATH.obj)\scheme.as1 $(.PATH.ash)\scheme.ash
- @type &&!
- %POPLCTL
- ! >>$(.PATH.ash)\scheme.ash
- @del $(.PATH.obj)\scheme.as?
-
- #
- # Generate .EXE file
- #
-
- pcs.exe: arith.obj asmlink.obj debug.obj \
- error.obj escape.obj fastload.obj \
- graphics.obj input.obj \
- main.obj memory.obj msdos.obj \
- output.obj ports.obj print.obj \
- property.obj read.obj support.obj \
- bid.obj bigmath.obj block.obj \
- border.obj biosio.obj carcdr.obj \
- commonio.obj cons.obj environ.obj \
- gcmark.obj gcreloc.obj \
- gcsquish.obj gcsweep.obj \
- interprt.obj interupt.obj memmgr.obj \
- objhash.obj printatm.obj printinc.obj \
- readatom.obj scannum.obj scheme.obj \
- search.obj slink.obj sproprty.obj \
- stdio.obj stack.obj start.obj \
- stream.obj string.obj swint.obj \
- timer.obj utils.obj vars.obj \
- window.obj
- $(GREP) -lo "scheme.a*s*h" $(.PATH.obj)\*.obj >makelink.tmp
- @echo graphics.lib >>makelink.tmp
- $(CC) -lc -lyx -n. -e$(.PATH.exe)\pcs.exe @makelink.tmp
- @del makelink.tmp
-
- pcs.ref: arith.xrf asmlink.xrf debug.xrf \
- error.xrf escape.xrf fastload.xrf \
- graphics.xrf input.xrf \
- main.xrf memory.xrf msdos.xrf \
- output.xrf ports.xrf print.xrf \
- property.xrf read.xrf support.xrf \
- bid.xrf bigmath.xrf block.xrf \
- border.xrf biosio.xrf carcdr.xrf \
- commonio.xrf cons.xrf environ.xrf \
- gcmark.xrf gcreloc.xrf \
- gcsquish.xrf gcsweep.xrf \
- interprt.xrf interupt.xrf memmgr.xrf \
- objhash.xrf printatm.xrf printinc.xrf \
- readatom.xrf scannum.xrf scheme.xrf \
- search.xrf slink.xrf sproprty.xrf \
- stdio.xrf stack.xrf start.xrf \
- stream.xrf string.xrf swint.xrf \
- timer.xrf utils.xrf vars.xrf \
- window.xrf
- # move to compile, as a bug in TCREF allows only a short response file
- @cd $(.PATH.xrf)
- $(TCREF) @&&!
- arith+asmlink+debug+dump+error+escape+fastload+graphics+hash+input+
- main+memory+msdos+output+ports+print+printf+property+read+reify+reset+
- support+trace+bid+bigmath+block+border+biosio+carcdr+commonio+cons+
- environ+gcmark+gcreloc+gcsquish+gcsweep+interprt+interupt+memmgr+
- objhash+printatm+printinc+readatom+scannum+scheme+search+slink+sproprty+
- stdio+stack+start+stream+string+swint+timer+utils+vars+window,..\pcs.ref /p66 /w132 /c /r
- !
- @cd ..
- #
- # Boot defs for compile.all
- #
-
- miniboot.fsl: miniboot.s
- $(SCHEME) &&!
- (define pcs-debug-mode '())
- (let ((args (reverse pcs-initial-arguments)))
- (fast-save-file (cadr args) (car args)))
- (exit)
- ! $** $<
-
- #
- # Auto-compiler : source compiler
- #
- autocomp: miniboot.fsl makecomptemp bootstrp.app
-
- makecomptemp:
- copy &&!
- (set! pcs-debug-mode '())
- (fast-load "bin\\\\miniboot.fsl")
- (fast-load "bin\\\\pretty.fsl")
- (define srcdir "sources\\\\s\\\\") ; not too portable ...
- (define fsldir "compile\\\\")
- (for-each (lambda (file)
- (let ((src (string-append srcdir file ".s"))
- (obj (string-append fsldir file ".so")))
- (newline 'console)
- (map (lambda (n) (princ n 'console))
- `("[Compiling " ,src " to " ,obj "]"))
- (newline 'console)
- (gc)
- (pcs-compile-file src obj)))
- (cdr pcs-initial-arguments))
- (exit)
- ! MAKEAUTO.TMP
-
- bootstrp.app: macros.so macroexp.so simplify.so analysis.so \
- codegen.so peephole.so assemble.so comp.so \
- standard.so stdfunc.so io.so opcodes.so \
- debugger.so charstr.so loadcomp.so loadrun.so \
- toplevel.so
- @echo. >$<
- @© /b $<+$** $<
- @touch $<
-
- #
- # Patch file for bootstrap
- #
-
- patch.pcs: makecomptemp patch.so patch.s
-
- #
- # Auto-compiler : Autoload tools
- #
- tools: makecomptemp \
- advise.so defstruc.so ed.so \
- edit.so errhand.so \
- fastsave.so graphics.so inspect.so \
- math.so msdos.so newwin.so \
- num2str.so pretty.so sort.so \
- vararg.so windows.so \
- advise.fsl defstruc.fsl ed.fsl \
- edit.fsl errhand.fsl desktop.fsl \
- fastsave.fsl graphics.fsl inspect.fsl \
- math.fsl msdos.fsl newwin.fsl \
- num2str.fsl pretty.fsl sort.fsl \
- vararg.fsl windows.fsl mouse.fsl \
- step.fsl
-
- step.fsl: sources\step\step.s sources\step\stepaux.s sources\step\stepwrap.s
- $(SCHEME) &&!
- (set! pcs-debug-mode '())
- (fast-save-file '("sources/step/step.s" "sources/step/stepaux.s"
- "sources/step/stepwrap.s") "bin/step.fsl")
- (exit)
- !
-
- #
- # WEB
- #
- web: sweave.exe stangle.exe
- sweave.exe: sweb.c
- $(CC) -e..\$< $**
- stangle.exe: sweb.c
- $(CC) -e..\$< -DTANGLE $**
-
- #
- # Common LISP compatibility package
- #
- clcp.fsl: sources\lisp\basic.lsp \
- sources\lisp\defmacro.lsp \
- sources\lisp\format.lsp \
- sources\lisp\io.lsp \
- sources\lisp\macros.s \
- sources\lisp\sequence.lsp
- move $(.PATH.fsl)\clcp.fsl clcp.old
- $(SCHEME) &&!
- (define srcdir "sources/lisp/")
- (define bindir "bin/")
- (fast-load (%system-file-name "miniboot.fsl"))
- (fast-load (%system-file-name "clcp.old"))
- (fast-save-file (map (lambda (file) (writeln "Compiling CLCP: " file)
- (string-append srcdir file))
- '("macros.s" "basic.lsp" "defmacro.lsp" "io.lsp"
- "format.lsp" "sequence.lsp"))
- (string-append bindir "clcp.fsl"))
- (exit)
- !
- del $(.PATH.fsl)\clcp.old
-
- #
- # Edwin compilation
- #
- edwin: miniboot.fsl
- @make -fmakefile.edw
-
- #
- # scoops
- #
- scoops.fsl:
- $(SCHEME) &&!
- (define srcdir "sources/s/scoops/")
- (define bindir "bin/")
- (fast-load (%system-file-name "miniboot.fsl"))
- (fast-save-file (map (lambda (file) (writeln "Compiling SCOOPS: " file)
- (string-append srcdir file))
- '("class.s" "methods.s" "instance.s"
- "inherit.s" "interf.s" "send.s"
- "utility.s" "expand.s" "types.s"))
- (string-append bindir "scoops.fsl"))
- (exit)
- !
-
- tutorial.fsl:
- $(SCHEME) &&!
- (define srcdir "sources/s/scoops/")
- (define bindir "bin/")
- (fast-load (%system-file-name "miniboot.fsl"))
- (writeln "Compiling tutorial.")
- (fast-save-file (string-append srcdir "tutorial.s")
- (string-append bindir "tutorial.fsl"))
- (writeln "Compiling frames.")
- (fast-save-file (string-append srcdir "frame.s")
- (string-append bindir "frame.fsl"))
- (exit)
- !
- #
- # Stuff
- #
- miscellanea: b.fsl edlisp.fsl
-
- b.fsl: brief\b.sw
- $(SCHEME) &&!
- (define srcdir "brief/")
- (define bindir "bin/")
- (fast-load (%system-file-name "miniboot.fsl"))
- (fast-save-file (string-append srcdir "b.sw")
- (string-append bindir "b.fsl"))
- (exit)
- !
-
- edlisp.fsl: edlisp.s
- $(SCHEME) &&!
- (define srcdir "sources/s/")
- (define bindir "bin/")
- (fast-load (%system-file-name "miniboot.fsl"))
- (fast-save-file (string-append srcdir "edlisp.s")
- (string-append bindir "edlisp.fsl"))
- (exit)
- !
-
- #
- # demos
- #
- snow.obj: inline\snow.asm
- tasm /m inline\snow $(.PATH.obj)\snow
-
- snow.bin: snow.obj
-
- scramble.obj: inline\scramble.asm
- tasm /m inline\scramble $(.PATH.obj)\scramble
-
- scramble.bin: scramble.obj
-
- peek.obj: inline\peek.asm
- tasm /m inline\peek $(.PATH.obj)\peek
-
- peek.bin: peek.obj
-
- #
- # cleanup:
- #
- clean: tidy
- del $(.PATH.obj)\*.obj
- tidy:
- del $(.PATH.asm)\*.bak
- del $(.PATH.c)\*.bak